# $NetBSD: Makefile,v 1.27 2020/08/31 18:09:20 wiz Exp $

DISTNAME=		radare2-5.1.0
CATEGORIES=		devel
GIT_REPOSITORIES=	radare2
GIT_REPO.radare2=	https://github.com/radare/radare2.git
WRKSRC=			${WRKDIR}/radare2

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://www.radare.org/
COMMENT=	Reverse engineering framework
LICENSE=	gnu-gpl-v3

HAS_CONFIGURE=		YES
CONFIGURE_ARGS+=	--mandir=${PREFIX}/${PKGMANDIR}
CONFIGURE_ARGS+=	--with-sysmagic
CONFIGURE_ARGS+=	--with-syscapstone
CONFIGURE_ARGS+=	--with-syszip
PKGCONFIG_OVERRIDE+=	pkgcfg/*.pc*
USE_TOOLS+=		gmake patch pkg-config perl

# node
CHECK_INTERPRETER_SKIP+=	share/radare2/${PKGVERSION_NOREV}/www/m/fonts/iconjar-map.js

#PLIST_SUBST+=	R2VERSION=${PKGVERSION_NOREV}-git # trunk revision
PLIST_SUBST+=	R2VERSION=${PKGVERSION_NOREV} # release revision

.include "options.mk"

.include "../../devel/capstone/buildlink3.mk"
.include "../../sysutils/file/buildlink3.mk"
.include "../../archivers/libzip/buildlink3.mk"
.include "../../wip/mk/git-package.mk"
.include "../../mk/bsd.pkg.mk"
